package com.zecan.springcloud.service;

import com.zecan.springcloud.entity.CommonResult;
import com.zecan.springcloud.entity.Payment;
import com.zecan.springcloud.service.impl.FallbackServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName FallbackService
 * @Description TODO
 * @date 2022/5/13 10:35
 * @Version 1.0
 */
// fallback  ==> 当出现异常时的兜底返回方法
@FeignClient(value = "nacos-payment-provider" ,fallback = FallbackServiceImpl.class)
public interface FallbackService {


    @GetMapping("/consumer/fallback/{id}")
     CommonResult<Payment> paymentSQL(@PathVariable("id") Long id);
}
